<?php


namespace app\salesman\validate;


use think\Validate;

class Salesman extends Validate
{
    protected $rule = [
        'password' => 'require|length:6,18',
        'confirmPassword' => 'require|confirm:password',
    ];

    protected $message = [
        'password.require' => '请输入新密码',
        'password.length'  => '6-18位的登录密码',
        'confirmPassword.require' => '请输入确认密码',
        'confirmPassword.confirm' => '两次输入密码不一致',
    ];

    protected $scene = [
        'updatePassword' => [
            'password',
            'confirmPassword',
        ]
    ];
}